<template>
  <div>
    <Hearder />
    <el-card>
      <el-alert
        title="提示:只能看见三级分支"
        :closable="false"
        show-icon
        type="warning"
      >
      </el-alert>
      <el-row>
        <el-col>
          <span>123</span>
          <el-cascader
            v-model="slectList"
            :options="cascadeList"
            :props="cascade"
            @change="handleChange"
          >
          </el-cascader>
        </el-col>
      </el-row>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      slectList: [],
      cascade: {
        value: "cat_id",
        label: "cat_name",
        children: "children",
      },
      cascadeList: [],
      getInfo: {
        type: 3,
        pagenum: 1,
        pagesize: 5,
      },
    };
  },
  methods: {
    handleChange() {},
    async getcascadeList() {
      const { data: res } = await this.$http
        .get("categories", { params: this.getInfo })
        .catch((err) => err);
      console.log(res);
      this.cascadeList = res.data;
    },
  },
  mounted() {
    this.getcascadeList();
  },
};
</script>

<style></style>
